import $ from "jquery";
import { Message, ChatBox } from "./src/talk";
import { AgentTool } from "./src/tools";
$(function () {
  let ds = new Message(
    "59cb7a71-2b71-480a-a193-4b4fc9b63458",
    null,
    "deepseek-r1",
    "https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png",
    "assistant",
    null,
    null,
    null
  );
  ds.renderMessage($(".chat-container"));
  let user = new Message(
    "59cb7a71-2b71-480a-a193-4b4fc9b634990",
    null,
    "xiaochangming",
    "https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png",
    "user",
    null,
    null,
    null
  );
  //   user.renderMessage($(".chat-container"));
  //   let tt = new TextTool("asdfasdfasdf", "你好,很高兴为您服务");
  let at = new AgentTool("123456", "current_time", {
    request: "现在是几点了？",
  });
  ds.appendTool(at);
  //   user.appendTool(at);
  at.stream({
    text: "现在时间是12:00",
  });

  let cb = new ChatBox("请输入文字接入大模型");
  cb.render($(".chat-input-container"));
});
